package com.lcy.demo;

import org.springframework.kafka.annotation.KafkaListener;

import java.util.concurrent.CountDownLatch;

/**
 * Created by PC on 2017/3/30.
 */
public class Listener {
    public final CountDownLatch latch = new CountDownLatch(1);

    @KafkaListener(id="foo",topics = "TEST-TOPIC")
    public void listen(String foo){
        this.latch.countDown();
        System.out.println(foo);
    }
}
